package com.education.user.pojo;


import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 系统用户表 sys_user
 *
 * @author d
 * @date 2020-01-17
 */

@Table(name = "sys_user")
public class SysUser implements Serializable {
    private static final long serialVersionUID=1L;

    /** 自增id tkMyBatis配置新增返回主键 */
    @Id
    @GeneratedValue(generator = "JDBC",strategy = GenerationType.IDENTITY)
    private Integer id;

    @Transient
    private String strId;

    /** 真实姓名 */
    @Column(name = "sys_relname")
    private String sysRelname;

    /** 用户密码 */
    private String sysPassword;

    /** 用户头像 */
    @Column(name = "sys_ico")
    private String sysIco;

    /** 用户状态（0正常，1停用，2黑名单，3已登录） */
    private Integer sysState;

    /** 登录账号 */
    @ApiModelProperty(value = "手机号")
//    @Column(name = "sys_phone")
    private String sysPhone;

    /** 联系地址 */
    private String sysAddress;

    /** 创建时间（注册时间） */
    @Column(name = "create_time")
    //@DateTimeFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String createTime;

    /** 类型(1学生 2老师 3教务主任 */
    private String sysType;

    /** 学校ID */
//    @Column(name = "school_id")
    private Integer schoolId;

    /** 1 男 2女 */
    @Column(name = "sys_sex")
    private String sysSex;

    //用户拥有的达人币总数
    @Column(name = "price")
    private BigDecimal price;

    /**  */
    private String sysAge;

    /** 默认登录次数 */
    private Integer logins;

    private String SysAttention;

    /** 部门id */
    private Integer deptId;

    @Transient
    private String deptName;

    /** 接受角色id */
    @Transient
    private Integer roleId;

    /** 角色id 集合 */
    @Transient
    private List<Integer> roleList;

    /** 开始时间 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Transient
    private String startTime;
    /** 结束时间 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Transient
    private String endTime;

    @Transient
    private String roleName;

    @Transient
    private String label;

    private Integer classId;

    @Transient
    private Integer value;

    private String customerType;

    //任教科目
    private String subjects;

    //u盾密码
    private String usbKey;

    //身份证号
    private String idcardno;

    //token
    @Transient
    private String token;

    private String expireDate;

    private Integer[] catalogIds;

    public String getIdcardno() {
        return idcardno;
    }

    public void setIdcardno(String idcardno) {
        this.idcardno = idcardno;
    }

    public String getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(String expireDate) {
        this.expireDate = expireDate;
    }

    public Integer[] getCatalogIds() {
        return catalogIds;
    }

    public void setCatalogIds(Integer[] catalogIds) {
        this.catalogIds = catalogIds;
    }


    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getUsbKey() {
        return usbKey;
    }

    public void setUsbKey(String usbKey) {
        this.usbKey = usbKey;
    }

    public String getSubjects() {
        return subjects;
    }

    public void setSubjects(String subjects) {
        this.subjects = subjects;
    }

    public String getStrId() {
        return strId;
    }

    public void setStrId(String strId) {
        this.strId = strId;
    }

    public String getCustomerType() {
        return customerType;
    }

    public void setCustomerType(String customerType) {
        this.customerType = customerType;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getSysAttention() {
        return SysAttention;
    }

    public void setSysAttention(String sysAttention) {
        SysAttention = sysAttention;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    /** 修改密码是接受验证码 */
    //private String code;
    /*@Column
    private Integer code;
    @Column
    private String newPassWord;*/

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSysRelname() {
        return sysRelname;
    }

    public void setSysRelname(String sysRelname) {
        this.sysRelname = sysRelname;
    }

    public String getSysPassword() {
        return sysPassword;
    }

    public void setSysPassword(String sysPassword) {
        this.sysPassword = sysPassword;
    }

    public String getSysIco() {
        return sysIco;
    }

    public void setSysIco(String sysIco) {
        this.sysIco = sysIco;
    }

    public Integer getSysState() {
        return sysState;
    }

    public void setSysState(Integer sysState) {
        this.sysState = sysState;
    }

    public String getSysPhone() {
        return sysPhone;
    }

    public void setSysPhone(String sysPhone) {
        this.sysPhone = sysPhone;
    }

    public String getSysAddress() {
        return sysAddress;
    }

    public void setSysAddress(String sysAddress) {
        this.sysAddress = sysAddress;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getSysType() {
        return sysType;
    }

    public void setSysType(String sysType) {
        this.sysType = sysType;
    }

    public Integer getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Integer schoolId) {
        this.schoolId = schoolId;
    }

    public String getSysSex() {
        return sysSex;
    }

    public void setSysSex(String sysSex) {
        this.sysSex = sysSex;
    }

    public String getSysAge() {
        return sysAge;
    }

    public void setSysAge(String sysAge) {
        this.sysAge = sysAge;
    }

    public Integer getLogins() {
        return logins;
    }

    public void setLogins(Integer logins) {
        this.logins = logins;
    }

    public List<Integer> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Integer> roleList) {
        this.roleList = roleList;
    }

    /*public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getNewPassWord() {
        return newPassWord;
    }

    public void setNewPassWord(String newPassWord) {
        this.newPassWord = newPassWord;
    }*/
}